package model

import "time"

// Ticket represents persisted ticket document.
type Ticket struct {
	ID           string    `bson:"_id"`
	TicketNumber string    `bson:"ticketNumber"`
	Title        string    `bson:"title"`
	Description  string    `bson:"description"`
	Status       string    `bson:"status"`
	Priority     string    `bson:"priority"`
	Type         string    `bson:"type"`
	AssignedTo   string    `bson:"assignedTo,omitempty"`
	CreatedBy    string    `bson:"createdBy,omitempty"`
	AlertID      string    `bson:"alertId,omitempty"`
	Tags         []string  `bson:"tags,omitempty"`
	Comments     []Comment `bson:"comments,omitempty"`
	CreatedAt    time.Time `bson:"createdAt"`
	UpdatedAt    time.Time `bson:"updatedAt"`
}

// Comment represents a comment on a ticket
type Comment struct {
	Content    string    `bson:"content"`
	UserName   string    `bson:"userName"`
	IsInternal bool      `bson:"isInternal"`
	CreatedAt  time.Time `bson:"createdAt"`
}
